//
//  UILabel+Extension.swift
//  LBWeibo
//
//  Created by 李博 on 15/6/30.
//  Copyright © 2015年 libo. All rights reserved.
//

import UIKit

extension UILabel {
    
    convenience init(color: UIColor, fontSize: CGFloat, multiLines: Bool = false) {
        self.init();
        
        font = UIFont.systemFontOfSize(fontSize)
        textColor = color
        //self.sizeToFit()
        
        if multiLines {
            numberOfLines = 0
        }
        
    }
    convenience init(textColor: UIColor, fontSize: CGFloat, layoutWidth: CGFloat) {
        self.init()
        
        self.textColor = textColor
        self.font = UIFont.systemFontOfSize(fontSize)
        self.preferredMaxLayoutWidth = layoutWidth
        self.numberOfLines = 0
        
    }
}
